package com.ridu.project.beshid.entity;

import lombok.*;

import javax.persistence.*;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Entity
@Table(name = "jifen", catalog = "besh_id_edu")
public class JifenEntity extends BaseEntity {

    @Basic
    @Column(name = "transaction_hash",columnDefinition = "varchar(150) COMMENT '哈希'")
    private String transactionHash;

    @ManyToOne
    @JoinColumn(name = "user_id")
    private BeshUserEntity owner;

    @ManyToOne
    @JoinColumn(name = "admin_id")
    private UserEntity user;

    @Basic
    @Column(name = "jifen",columnDefinition = "varchar(50) COMMENT '积分'")
    private String jifen;

    @Basic
    @Column(name = "total",columnDefinition = "varchar(50) COMMENT '总积分'")
    private String total;

    private String sourceChannel;//来源渠道

    public JifenEntity(String transactionHash) {
        this.transactionHash = transactionHash;
    }

}
